<!-- saved from url=(0014)about:internet -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>FlowerColorRenderer.mxml</title>
<link rel="stylesheet" type="text/css" href="../../../../../SourceStyles.css"/>
</head>

<body><pre><span class="MXMLProcessing_Instruction">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>
<span class="MXMLComponent_Tag">&lt;mx:Box</span><span class="MXMLDefault_Text"> xmlns:mx="</span><span class="MXMLString">http://www.adobe.com/2006/mxml</span><span class="MXMLDefault_Text">" 
    backgroundColor="</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">_bgColor</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">"
    horizontalScrollPolicy="</span><span class="MXMLString">off</span><span class="MXMLDefault_Text">"
    borderStyle="</span><span class="MXMLString">solid</span><span class="MXMLDefault_Text">"
    borderThickness="</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">"
    cornerRadius="</span><span class="MXMLString">12</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">&gt;</span>
    
    <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> styleName="</span><span class="MXMLString">button</span><span class="MXMLDefault_Text">" text="</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">data</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">" width="</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">" textAlign="</span><span class="MXMLString">center</span><span class="MXMLDefault_Text">" paddingTop="</span><span class="MXMLString">3</span><span class="MXMLDefault_Text">"</span><span class="MXMLComponent_Tag">/&gt;</span>
    
    <span class="MXMLSpecial_Tag">&lt;mx:Script&gt;</span>
        &lt;![CDATA[
        
            public override function set data(value:Object):void {
                super.data = value;
                
                if (value.color == <span class="ActionScriptString">"Light pink"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xE68FAC;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Orange"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xEE852A;    
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Corn"</span><span class="ActionScriptBracket/Brace">)</span>
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xFBEC5D;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Seashell"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xFFF5EE;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Maize"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xFBEC5D;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Pale magenta"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xF984E5;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Rose vale"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xAB4E52;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Ochre"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xCC7722;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Wisteria"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xC9A0DC;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Cerise"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xDE3163;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Blue"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0x5F72B4;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Saffron"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xF4C430;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">value</span><span class="ActionScriptOperator">.</span><span class="ActionScriptDefault_Text">color</span> <span class="ActionScriptOperator">==</span> <span class="ActionScriptString">"Cream"</span><span class="ActionScriptBracket/Brace">)</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xFFFDD0;
                <span class="ActionScriptBracket/Brace">}</span> <span class="ActionScriptReserved">else</span> 
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">_bgColor</span> <span class="ActionScriptOperator">=</span> 0xFFFFFF;
                <span class="ActionScriptBracket/Brace">}</span>
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">Bindable</span><span class="ActionScriptBracket/Brace">]</span>
            <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">_bgColor</span> : <span class="ActionScriptDefault_Text">Number</span>;
        <span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptBracket/Brace">]</span><span class="ActionScriptOperator">&gt;</span>
    <span class="MXMLSpecial_Tag">&lt;/mx:Script&gt;</span> 
<span class="MXMLComponent_Tag">&lt;/mx:Box&gt;</span></pre></body>
</html>
